Method and apparatus for simplifying the decoding of data

ABSTRACT

The various methods and devices described herein relate to devices which, in at least certain embodiments, may include a method of decoding data or a data stream in a file, which may include checking for a first data portion of a plurality of data portions in the file, the first data portion having a first data value, reading in data from another data portion of the plurality of data portions, decoding or decompressing the data, performing a checksum operation on the decoded data if the first data portion having the first data value is not detected, and skipping a checksum operation on the decoded data if the first data portion having the first data value is detected. In the embodiment, a checksum operation on encoded data may also be skipped. In an embodiment, the first data value may include information or instructions about how a decoder may decode the data and may also include a tag or identifier.

FIELD OF THE INVENTION

This invention relates to the decoding of data in a file, in particular,to methods and apparatuses for decoding data in an image file.

BACKGROUND OF THE INVENTION

Portable devices, such as personal digital assistants (PDAs) and cellphones, are becoming increasingly common. These portable devices havegrown more complex over time, incorporating many features including, forexample, MP3 player capabilities, web browsing capabilities, and thelike. The storage capacity and performance of the hard drives of theseportable devices, however, can be limited. As a result, certain tasksthat are typically executed instantaneously on a desktop computer, suchas displaying images for a graphical user interface, may takesignificantly longer on a portable device.

One image file format used to store and display such images includes thePortable Networks Graphics (PNG) format. Like the Graphics InterchangeFormat (GIF), the PNG format can be a good choice for text, logos, orgraphics including sharp transitions or lines. Unlike GIF, however, thePNG format has the benefit of having an open, extensible file format.The PNG format also offers many useful features that may not be offeredby older formats, such as for example, interlacing, fullalpha-transparency and lossless compression.

The PNG format also offers several security checks during decoding ordecompression. For example, the data in each PNG file is divided intosections or chunks and each chunk typically includes at least oneredundancy check or checksum, allowing a decoder to detect corrupteddata. Such checks are necessary, especially when a PNG file isdownloaded from the Internet or an unknown source. If the file is comingfrom a source known to be secure, however, then such measures cansometimes unnecessarily delay the display of the image, especially on aportable device that has limited hard drive capability.

SUMMARY OF THE DESCRIPTION

The various methods and devices described herein relate to a method ofdecoding data or a data stream in a file, which, in at least certainembodiments, may include checking for a first data portion of aplurality of data portions in the file, the first data portion having afirst data value, reading in data from another data portion of theplurality of data portions, decoding or decompressing the data,performing a checksum operation on the decoded data if the first dataportion having the first data value is not detected, and skipping achecksum operation on the decoded data if the first data portion havingthe first data value is detected. In an embodiment, the first data valuemay include information or instructions about how a decoder may decodethe data and may also include a tag or identifier.

In various embodiments, the file including the data may be any suitableimage or non-image data file. According to an embodiment, the file maybe an image data file such as a Portable Network Graphics (PNG) file. Inat least certain embodiments, the first data portion may be a criticaldata chunk or critical chunk that may include information aboutproperties of an image encoded by the file, while the second dataportion may include an image data (IDAT) chunk that includes actualimage data for the image encoded by the file. In various embodiments,the critical chunk may include instructions for decoding image dataincluding a premultiplied alpha channel. Thus, in at least certainembodiments, the image data chunk may include data including a red,green and blue (RGB) color value premultiplied with a transparency valueor alpha value. The image data chunk may also include data that does notinclude or is not preceded by a header. Thus, the critical chunk mayinclude instructions for decoding data that does not include a header,allowing a decoder to skip one or more verification operationsassociated with decoding the image data, according to embodiments of theinvention.

In at least certain embodiments, a file such as a PNG file that has beenmodified according to embodiments of the invention may be encoded andstored on a digital storage medium that may be capable of being read anddisplayed by a data processing system. Thus, in at least certainembodiments, a method includes encoding data into a first data sectionand a second data section included in a plurality of data sections inthe file. In an embodiment, the first data section is encoded with afirst data value of a first type or a second type. In one embodiment,the data value of the first type may include information to indicatethat a data check such as a checksum may be performed on the data of thesecond data section, whereas the data value of the second type includesinformation that allows a data check on the data in the second datasection to be skipped. Thus, in an embodiment, a data check or datacheck value may be encoded into the second data section if the firstdata section includes the first data value of the first type.Accordingly, in an embodiment, information may be encoded into thesecond data section to allow the data check to be skipped if the firstdata section includes a first data value of the second type.

Furthermore, in at least certain embodiments, a method may includeencoding data into a first data section or critical data chunk thatincludes an indication to a decoder that a scan line of an imagerepresented by the file has been filtered with a same filter as anotherscan line of the image represented by the file. In at least certainembodiments, a premultiplied alpha channel that includes an opaque imageencoded by a four-channel RGBA image may also be encoded in a seconddata section or image data (IDAT) chunk.

Additional methods for simplifying the decoding of data are alsodescribed. Various devices which perform one or more of the foregoingmethods and machine readable media which, when executed by a processingsystem, cause the processing system to perform these methods, are alsodescribed. For example, in an embodiment, the method above may beperformed by an embedded device that may read and display an image aspart of a user interface.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention is described by way of example with reference to theaccompanying drawings, wherein:

FIG. 1A illustrates an example structure of a prior art data file;

FIG. 1B illustrates an example structure of an image data chunk includedin the prior art data file of FIG. 1A;

FIG. 2A illustrates an example structure of a data file in accordancewith an embodiment of the present invention;

FIG. 2B illustrates an example structure of an image data chunk inaccordance an embodiment of the present invention;

FIG. 3 is a flow diagram of a process related to a decoding of the datafile of FIG. 2A in accordance with embodiments of the present invention;and

FIG. 4 is a block diagram illustrating various components of an exampledevice, with which embodiments of the present invention can be practiced

DETAILED DESCRIPTION

Various embodiments and aspects of the invention will be described withreference to details discussed below, and the accompanying drawings willillustrate the various embodiments. The following description anddrawings are illustrative of the invention and are not to be construedas limiting the invention. Numerous specific details are described toprovide a through understanding of various embodiments of the presentinvention. However, in certain instances, well-known or conventionaldetails are not described in order to provide a concise discussion ofembodiments of the present inventions.

Unless specifically stated otherwise as apparent from the followingdiscussion, it is appreciated that throughout the description,discussions utilizing terms such as “processing” or “computing” or“calculating” or “determining” or “displaying” or the like, can refer tothe action and processes of a data processing system, or similarelectronic device, that manipulates and transforms data represented asphysical (electronic) quantities within the system's registers andmemories into other data similarly represented as physical quantitieswithin the system's memories or registers or other such informationstorage, transmission or display devices.

The present invention can relate to an apparatus for performing one ormore of the operations described herein. This apparatus may be speciallyconstructed for the required purposes, or it may comprise a generalpurpose computer selectively activated or reconfigured by a computerprogram stored in the computer. Such a computer program may be stored ina machine (e.g. computer) readable storage medium, such as, but is notlimited to, any type of disk including floppy disks, optical disks,CD-ROMs, and magnetic-optical disks, read-only memories (ROMs), randomaccess memories (RAMs), erasable programmable ROMs (EPROMs),electrically erasable programmable ROMs (EEPROMs), magnetic or opticalcards, or any type of media suitable for storing electronicinstructions, and each coupled to a bus.

A machine-readable medium includes any mechanism for storing ortransmitting information in a form readable by a machine (e.g., acomputer). For example, a machine-readable medium includes read onlymemory (“ROM”); random access memory (“RAM”); magnetic disk storagemedia; optical storage media; flash memory devices; electrical, optical,acoustical or other form of propagated signals (e.g., carrier waves,infrared signals, digital signals, etc.); etc.

At least certain embodiments of the invention may be part of a digitalmedia player, such as a portable music and/or video media player, whichmay include a media processing system to present the media, a storagedevice to store the media and may further include a radio frequency (RF)transceiver (e.g., an RF transceiver for a cellular telephone) coupledwith an antenna system and the media processing system. In certainembodiments, media stored on a remote storage device may be transmittedto the media player through the RF transceiver. The media may be, forexample, one or more of music or other audio, still pictures, or motionpictures.

Embodiments of the inventions described herein may be part of othertypes of data processing systems, such as, for example, entertainmentsystems or personal digital assistants (PDAs), or general purposecomputer systems, or special purpose computer systems, or an embeddeddevice within another device, or cellular telephones which do notinclude media players, or devices which combine aspects or functions ofthese devices (e.g., a media player, such as an iPod®, combined with aPDA, an entertainment system, and a cellular telephone in one portabledevice).

Various operations will be described as multiple discrete operations. Inturn, in a manner that is most helpful in understanding the presentinvention, however, the order of description should not be construed asto imply that these operations are necessarily order dependent. Inparticular, these operations need not be performed in the order ofpresentation.

Furthermore, reference throughout this specification to “one embodiment”or “an embodiment means that a particular feature, structure, orcharacteristic described in connection with the embodiment is includedin at least one embodiment of the present invention. Thus, theappearances of the phrases “in one embodiment” or “in an embodiment” invarious places throughout this specification are not necessarily allreferring to the same embodiment. Furthermore, the particular features,structures, or characteristics may be combined in any suitable manner inone or more embodiments.

FIG. 1A illustrates an example structure of a simplified prior art PNGimage data file or file 100. Note that the official PNG file format isdescribed in the PNG Specification, W3C Recommendation, v.2, 14 Oct.2003, and the International Standard ISO/IEC 15948:2003. In FIG. 1A,file 100 may begin with an 8-byte file signature 102 that identifiesfile 100 as a PNG image data file to be decoded. Note that a PNG file istypically encoded or compressed by a method referred to as deflation andis typically decoded or decompressed by a method referred to asinflation.

Following file signature 102, a data or byte sequence in file 100 istypically divided into data sections or “chunks.” Each chunk maytypically have a length of 4 bytes and have an encoded identifier or4-letter name that indicates the type of information or data (such asactual image data or other data related to the decoding of the imagedata) that a chunk is to convey to a decoder. In FIG. 1A, a plurality ofcritical chunks 104 comes after file signature 102 and may include datathat is necessary for a decoder to inflate or decode the actual imagedata. Examples of critical chunks 104 may include an IHDR or PLTE chunk.An IHDR chunk may include properties related to the encoded image suchas the width and height of the image, bit depth or whether the image candisplay alpha-channel transparency. As another example, a PLTE chunk mayprovide a palette table for the colors in a palette-based image.Although only two critical chunks 104 are shown in FIG. 1A, there maytypically be 5-10 or more critical chunks 104 in a file 100.

Next, the actual image data is divided among a plurality of IDAT chunks106. Note that in order to protect against corrupted data in file 100,each critical chunk 104 and each IDAT chunk 106 in file 100 typicallyincludes at least one checksum. As an example, a checksum may becomputed by a decoder as the data is decoded and then compared to avalue stored in the file during encoding. If the values do not match,data corruption is indicated. To further illustrate, FIG. 1B shows thecomponents or structure of one of a plurality of IDAT chunks 106A ofFIG. 1A. IDAT chunk 106A may be composed of a header 110, image data 112and a checksum 114. Image data 112 may include the actual image data forimage 116. Header 110 comes before image data 112 and providesinformation about image data 112, such as for example, how compressedimage data 112 is and other specifics a decoder may need to decode imagedata 112. Next, in IDAT chunk 106A, is checksum 114. One or morechecksums such as checksum 114 may be performed on compressed data inIDAT chunk 106 as well as on decompressed or decoded data from IDATchunk 106. Returning to FIG. 1A, end of file chunk 108 comes after theplurality of IDAT chunks 106 and indicates to a decoder that there areno more chunks in file 100 to be decoded.

Thus, note that in the PNG file format as described above and in the PNGspecification, various verification operations are included to verifythe integrity of the data that is to be decoded. Such operations includemultiple data checks or checksums as described in relation to FIG. 1A.Note that such checksums may be important when a PNG image is downloadedfrom the Internet or other source that may not be secure. In many cases,however, such operations are not needed and only serve to slow down thedisplay of the image. For example, when an image is being downloadedfrom a hard drive of a same device on which the image is to bedisplayed, the checksums may be unnecessary because the data is known tobe secure. Accordingly, embodiments of the invention modify the PNGspecification or PNG file format to simplify the decoding of data. Inone embodiment, such a simplification may include adding a new criticalchunk to indicate to a decoder that a checksum is to be skipped.Accordingly, in the embodiment, an IDAT chunk may be encoded without achecksum operation. Various other examples of modifications to the PNGfile format that may simplify the decoding of data are also describedbelow.

Referring now to FIG. 2A, which shows a file 200 in accordance with anembodiment of the invention. In the embodiment, file 200 may include afile signature 202, a plurality of critical chunks 204, a plurality ofIDAT chunks 206 and an end of file chunk 208. In the embodiment, one ofplurality of critical chunks 204 includes a critical chunk 204A that mayinclude instructions to omit or skip one or more checksums or cyclicredundancy checks (CRCs) in one or more of the plurality of IDAT chunks206 or critical chunks 204. In the example shown, an identifier ofcritical chunk 204A is CgBI, but could be any suitable identifier, nameor tag that identifies its purpose to a decoder. Note that checksums maybe skipped or omitted without compromising security because file 200 maybe received from a known source, such as for example, the hard drive ofa device that is to display an image encoded in file 200. In oneembodiment, file 200 may have been stored in a hard drive of an embeddedsystem of a portable device at production time.

In at least some embodiments, the purpose of critical chunk 204A may beto simplify a decoding of data in file 200 by omitting one or morechecksums or another operation related to verifying the integrity offile 200. For example, critical chunk 204A may also, in an embodiment,include instructions for decoding data that does not include a header inthe one or more of a plurality of IDAT chunks 206. To illustrate, FIG.2B shows one of a plurality of IDAT chunks 206A of FIG. 1A, that may beincluded in file 200 according to embodiments of the invention.According to the embodiment, IDAT chunk 206A includes unencapsulatedimage data 212 that represents image 216 or a portion of image 216.Unencapsulated image data 212, in an embodiment, may include data thatis not preceded by a header, such as header 110 of previous FIG. 1B,and/or data without one or more checksums, such as checksum 114 of FIG.1B. Thus, in one embodiment, instructions included in critical chunk204A allow a decoder to decode data without a header and to skip theperformance of one or more verification operations associated withdecoding image data. Such operations may include various checks, such asincluding, but not limited to, verifying that the data is an expectedcompression or deflation type, such as specified in the header.Furthermore, in at least some embodiments, critical chunk 204A may alsoinform a decoder that the decoded data from one or more of plurality ofIDAT chunks 206 will have a little-endian format.

In one embodiment, image data 212 may include a pre-multiplied alphachannel 218 to simplify the decoding of the data in IDAT chunk 206A. Toillustrate, note that in an RGBA image or true color image with variabletransparency, a color of a pixel may be represented by a red, green andblue or RGB value, multiplied by an alpha value between 0 and 1,representing a desired degree of transparency (or, more accurately,opacity). Thus, for example, non-premultiplied RGBA values correspondingto a white pixel with a desired 50% degree of opacity may have storedvalues of (1.0, 1.0, 1.0, 0.5), whereas pre-multiplied RGBA values, forthe same pixel may have stored values of approximately (0.5, 0.5, 0.5,0.5). Note that presently, the PNG format does not allow encoded data toinclude a premultiplied alpha channel. According to embodiments of theinvention, however, premultiplying an RGB value with an alpha value maysimplify the decoding of data in file 200 because computations involvingthe alpha value have already been completed and may not have to beperformed for each pixel during decoding.

In at least certain embodiments, critical chunk 204A may includeinstructions to indicate to a decoder that a four-channel RGBA image isfully opaque. Note that typically, when a PNG image is opaque it may beencoded with a 3-channel RGB format. However, in an embodiment of theinvention, the opaque image may be encoded with a 4-channel RGBA format.Thus, in an embodiment, an alpha component or value may be disregardedor ignored. In certain embodiments, encoding an opaque image using a4-channel RBGA format may be advantageous because an 4-channel RGBAimages may be more efficient to manipulate than 3-channel RGB images.

Furthermore, in at least certain embodiments, critical chunk 204A mayspecify an arbitrary pixel ordering. Note that the PNG file formattypically requires that image components for a pixel to be orderedR-G-B-A, an order that may not be supported by all hardware. Thus, in anembodiment, the image components may have an order different fromR-G-B-A. For example, the pixel ordering of the image components may beB-G-R-A or other suitable order to allow a decoder to efficiently decodethe data.

In an embodiment, critical chunk 204A may also indicate to a decoderthat substantially each row of pixels or scan line of an image uses asame or similar filter. Note that during encoding of a PNG file, theremay be a number of filters applied to each scan line of an image toachieve improved compression. Some filters may be more complex thanothers, thus requiring extra work to be performed by a decoder whiledecoding the image. In an embodiment, information may be added to thefile format to let the decoder know that each scan line of the image wasfiltered with a same filter type or a same filter method. Thus, in theembodiment, when the decoder encounters this hint or indication, thedecoder may check for a single filter type or filter method and avoidperforming extra work required by complex filtering methods.

It should be noted that the number and type of chunks shown in file 200have been simplified for clarity but in various embodiments, file 200may include additional elements such as additional chunks (critical ornon-critical chunks, otherwise known as ancillary chunks) with varyingchunk identifiers or names. In other embodiments, file 200 may not bedivided into chunks but may be stored in other formats consistent withother image or non-image data formats.

FIG. 3 is a flow diagram 300 illustrating a method for simplifying adecoding of data in a data file, in accordance with embodiments of theinvention. In the example shown, an image file such as, for example,file 200 of FIG. 2A may be opened at a block 330. At a block 332, an8-byte file signature may be read to give a decoder information aboutthe format of the file. In the embodiment, at a decision block 334, themethod includes checking for a first data portion or section having afirst data value. In the example, the first data portion may include acritical chunk 204A, while a first data value may include information orinstructions as to how the decoding of the data is to be simplified. Inthe embodiment, simplifying the decoding of the data may includeskipping one or more checksums. For example, this may include skipping achecksum on the decoded data, encoded data or both The first data valuemay also include a particular identifier, name, or tag, such as the nameof critical chunk 204A, CgBI of FIG. 2A, that indicates that thecritical chunk 204A contains such information.

Thus, if a critical chunk such as critical chunk 204A with a first datavalue is encountered at decision block 334, the process flows down theright branch of flow diagram 300 to a block 335. In the embodiment, atblock 335, first data portions or critical chunks 204 may be processedby the decoder. In one embodiment, a critical chunk such as 204A mayinclude a function call to a decompression library that does not includea checksum. In the embodiment, a checksum or data check is not performedand the process can continue on to a next block 336, where the decodercan begin to read actual image data from a second data portion such asone of a plurality of IDAT chunks 206. The data is then decoded at anext block 337. In an embodiment, critical chunk 204A may have indicatedto the decoder that substantially each scan line uses a same or similarfilter. In at least certain embodiments decoding data may includeskipping a multiplication of an alpha value with an RGB or grayscalevalue because an alpha value has already been premultiplied with the RGBor grayscale value.

In an embodiment, decoding the data may include inflating deflated data.Additionally, in one embodiment, the actual image data to be decoded mayinclude unencapsulated data such as image data 212 of FIG. 2A. In theembodiment, decoding unencapsulated data may simplify the decodingprocess because the decoder may skip one or more various verificationoperations related to information in the header. Finally, oncesubstantially all of the data in the IDAT chunk is decoded, the processmoves on to a next block 338 so that a decoder can check for anyadditional IDAT chunks. If there are remaining IDAT chunks to bedecoded, the process returns to block 336 to read in data from the nextIDAT chunk. The process repeats itself through blocks 336-338, until allof the IDAT chunks in the file have been read and decoded. In theembodiment, the process of decoding data in the image file can then endat block 352.

In the alternative, returning to decision block 334, if the decoderencounters a critical chunk that does not include a first data valuesuch as an identifier or instructions for simplifying the decoding ofdata, the method branches to a block 339 where data in one or more firstdata portions or critical chunks is processed. In the embodiment, acritical chunk may include a data value such as a function call to adecompression library. In the embodiment, the function call includes achecksum. A checksum is then performed on the data read from the one ormore critical chunks in a next block 340. If the checksum value computeddoes not match a stored value at a decision block 340 a, for any of thecritical chunks, an error message is generated at 343. If the checksumvalue does match the stored value for each critical chunk, the processcan continue to a block 341 where, actual image data from a second dataportion or IDAT chunk is read.

In the example, a second checksum may be computed or performed at a nextblock 342. Again, if the checksum value computed does not match a storedvalue at a decision block 342 a, an error message is generated at block343. According to the embodiment, if the checksum does match the storedvalue, the data is indicated as correct and the decoder may then begindecoding data in the IDAT chunk at a block 346. Decoding data at block346 may include decoding data in the IDAT chunk that includes a headerand a checksum. Thus, at a next block 348, a third checksum isperformed, this time on the decoded data to verify that the decoded dataor output pixels are correct. Again, if a computed checksum does notmatch a stored value at 348 a, the process ends in an error at block343. If the computed checksum does match, the process continues on to anext decision block 350.

At decision block 350, in the embodiment, once all of the image datafrom the second data portion has been decoded, a decoder may check tosee at if any second data portions or IDAT chunks remain to be decoded.If so, the process returns to a block 341 so that the decoder can readin data from a next IDAT chunk. The process repeats itself throughblocks 341-350, until all of the IDAT chunks in the file have beendecoded. When there are no remaining IDAT chunks to be decoded, thedecoding of the file may end at block 352.

Thus, in an embodiment, a PNG data file format has been modified toinclude a critical data chunk that may convey information to a decoderabout skipping a verification operation during a decoding of data in theIDAT chunk. Thus, in at least certain embodiments, a new critical chunk,such as for example, CgBI, has been added to a PNG file format toinclude information about skipping a computation of a checksum.Furthermore, in at least certain embodiments, the information aboutskipping the verification operation may include information aboutskipping the reading of a header in an IDAT chunk. Thus, a PNG fileformat has, in an embodiment, been modified such that an IDAT chunk mayinclude image data stored without a header and without a data checkvalue appended to the data. In various embodiments, the data check valueomitted may include a cyclic redundancy check (CRC) or checksum value.

Various other modifications to the PNG format that allow a decoder tomore quickly decode data have also been described. In an embodiment,information to indicate that each filter line of the PNG image has beenfiltered using a same filter may be encoded into the PNG file. Inanother example, a premultipled alpha channel may be encoded into theimage data and an opaque image may be encoded with a 4-channel RGBAimage.

In at least certain embodiments, the PNG file may be encoded and storedon a digital storage medium that may be capable of being read anddisplayed by a data processing system such as, for example, a handheldportable device or mobile cellular telephone. Thus, in at least certainembodiments, a method includes encoding data into a critical chunk of aPNG file, the critical chunk including a first data value of a firsttype or a second type. In one embodiment, the data value of the firsttype may include encoded information that indicates to a decoder that averification operation such as a computation of a checksum may beperformed. Accordingly, in the embodiment, a data check value such as achecksum value may be appended or included in an IDAT chunk. Thus, in anembodiment, the PNG file may store an image that may be decoded with achecksum because security may be a concern.

In the embodiment, however, when security may not be a concern, data maybe encoded into a critical chunk to include a data value of a secondtype. In an embodiment, the data value of the second type may includeinformation that allows a decoder to skip the data check on image datafrom the IDAT chunk. Thus in the embodiment, an identifier or otherinformation may be encoded in the critical data chunk to indicate that acomputation of a checksum may not be performed. Furthermore, in at leastcertain embodiments, a method may include encoding data into thecritical data chunk that includes an indication to a decoder that a scanline of an image represented by the file has been filtered with a samefilter as another scan line of the image represented by the file. In atleast certain embodiments, a premultiplied alpha channel that includesan opaque image encoded by a four-channel RGBA image may also be encodedin an IDAT chunk.

FIG. 4 shows an example of a device 400 according to an embodiment ofthe invention that may perform the method of FIG. 3. This device mayinclude a processor, such as microprocessor 402, and a memory 404, whichare coupled to each other through a bus 406. In the embodiment, device400 may include an embedded device including a processor that processesdata having little-endian format. The device 400 may optionally includea cache 408 which is coupled to the microprocessor 402. This device mayalso optionally include a display controller 410 and display device 411which is coupled to the other components through the bus 406. One ormore input/output controllers 412 are also coupled to the bus 406 toprovide an interface for input/output devices 414. The bus 406 mayinclude one or more buses connected to each other through variousbridges, controllers, and/or adapters as is well known in the art. Theinput/output devices 414 may include a keypad or keyboard or a cursorcontrol device such as a touch input panel. Furthermore, theinput/output devices 414 may include a network interface which is eitherfor a wired network or a wireless network (e.g. an RF transceiver).

In the foregoing specification, the invention has been described withreference to specific exemplary embodiments thereof. It will be evidentthat various modifications may be made thereto without departing fromthe broader spirit and scope of the invention as set forth in thefollowing claims. The specification and drawings are, accordingly, to beregarded in an illustrative sense rather than a restrictive sense.

1. A method of converting data in a file, comprising: checking for afirst data portion of a plurality of data portions in the file, thefirst data portion having a first data value; reading in data from asecond data portion of the plurality of data portions; decoding the datain the second data portion of the plurality of data portions; performinga checksum operation on the decoded data from the second data portion ifthe first data portion having the first data value is not detected; andskipping the checksum operation on the decoded data from the second dataportion if the first data portion having a first data value is detected.2. The method of claim 1 wherein checking for the first data portionincludes checking for a critical data chunk in an image file.
 3. Themethod of claim 2 wherein checking for a critical data chunk in an imagefile includes checking for a critical data chunk in a Portable NetworkGraphics (PNG) file.
 4. The method of claim 1 wherein reading in datafrom a second data portion includes reading in compressed data from animage data chunk.
 5. The method of claim 1 further comprising skipping amultiplication of a color value with a transparency value if the firstdata portion having the first data value is detected.
 6. The method ofclaim 5 wherein skipping the multiplication of the color value with thetransparency value includes skipping a multiplication of a red, greenand blue (RGB) value with an alpha value.
 7. The method of claim 1wherein checking for the first data portion having the first data valueincludes checking for the first data portion having an identifier thatidentifies the first data portion as a critical chunk that instructs adecoder to inflate data without a header.
 8. A machine-readable mediumstoring executable program instructions which when executed cause themachine to perform a method comprising: checking for a first dataportion of a plurality of data portions in the file, the first dataportion having a first data value; reading in data from a second dataportion of the plurality of data portions; decoding the data in thesecond data portion of the plurality of data portions; performing achecksum operation on the decoded data from the second data portion ifthe first data portion having the first data value is not detected; andskipping the checksum operation on the decoded data from the second dataportion if the first data portion having the first data value isdetected.
 9. The machine-readable medium of claim 8 wherein checking forthe first data portion includes checking for a critical data chunk in animage file.
 10. The machine-readable medium of claim 8 wherein themethod further comprises skipping a checksum operation on data that isnot decoded if the first data portion having the first data value isdetected.
 11. The machine-readable medium of claim 8 wherein reading indata from a second data portion includes reading in deflated data froman image data chunk.
 12. The machine-readable medium of claim 8 whereinperforming the method further comprises skipping a multiplication of acolor value with a transparency value if the first data portion havingthe first data value is detected.
 13. The machine-readable medium ofclaim 12 wherein the second data portion includes a premultiplied red,green and blue (RGB) value with an alpha value.
 14. The machine-readablemedium of claim 8 wherein decoding the data in the second data portionincludes inflating data with little-endian format.
 15. Themachine-readable medium of claim 8 wherein decoding the data in thesecond data portion includes decoding data for an opaque image encodedwith a four-channel RGBA format.
 16. An apparatus, comprising: means forchecking for a first data portion of a plurality of data portions in thefile, the first data portion having a first data value; means forreading in data from a second data portion of the plurality of dataportions; means for decoding the data in the second data portion of theplurality of data portions; means for performing a checksum operation onthe decoded data from the second data portion if the first data portionhaving the first data value is not detected; and means for skipping thechecksum operation on the decoded data from the second data portion ifthe first data portion having a first data value is detected.
 17. Adigital storage medium having stored thereon data representing an imagecapable of being read and displayed by a data processing system, whereinthe data representing the image includes a data file, comprising: afirst data section of a plurality of data sections in the data file, thefirst data section having a first data value or a second data value; anda second data section of the plurality of data sections in the datafile, the second data section to skip a data check if the first datasection includes the first data value, the second data section toinclude a data check if the first data section includes the second datavalue.
 18. The digital storage medium of claim 17 wherein the first datasection of the plurality of data sections includes a critical chunk in aPortable Network Graphics (PNG) file.
 19. The digital storage medium ofclaim 17 wherein the first data value includes a function call that doesnot include a checksum and the second data value includes a functioncall that does include a checksum.
 20. The digital storage medium ofclaim 17 wherein the data processing system is a handheld portabledevice.
 21. The digital storage medium of claim 17 wherein the dataprocessing system is a handheld cellular telephone.
 22. The digitalstorage medium of claim 17 wherein the second data section includes dataincluding a grayscale value that has been premultiplied with an alphavalue.
 23. The digital storage medium of claim 17 wherein the seconddata section includes data in a data chunk that is not preceded by aheader.
 24. The digital storage medium of claim 23 wherein the firstdata section includes a critical chunk that identifies the decoded datafrom an image data chunk as having little-endian format
 25. The digitalstorage medium of claim 17 wherein the first data section includes afirst data value including instructions to decode data without a header.26. The digital storage medium of claim 17 wherein the first datasection including instructions for decoding data having an arbitrarypixel ordering.
 27. The digital storage medium of claim 26 wherein thearbitrary pixel ordering is B-G-R-A.
 28. The digital storage medium ofclaim 18 wherein the first data section includes an indication to adecoder that each scan line of an image has been filtered with a samefilter.
 29. An apparatus, comprising: a processor; and a memory coupledto said processor, said memory having stored thereon instructions which,when executed by a decoder cause the decoder to perform a method, themethod comprising: checking for a first data portion of a plurality ofdata portions in a file, the first data portion having a first datavalue; reading in data from a second data portion of the plurality ofdata portions; decoding the data in the second data portion of theplurality of data portions; performing a checksum operation on the datafrom the second data portion if the first data portion having the firstdata value is not detected; and skipping the checksum operation on thedata from the second data portion if the first data portion having afirst data value is detected.
 30. The apparatus of claim 29 whereinchecking for the first data portion includes checking for a criticaldata chunk in an image file.
 31. The apparatus of claim 29 whereinreading in data from a second data portion includes reading in imagedata from a portable networks graphics (PNG) file.
 32. The apparatus ofclaim 29 wherein the memory has further stored thereon instructions todecode data for an opaque image encoded with a 4-channel RGBA format.33. The apparatus of claim 30 wherein the memory has further storedthereon instructions for decoding data including an arbitrary orderingof components for a pixel.
 34. The apparatus of claim 33 wherein thearbitrary ordering of components for a pixel comprises B-G-R-A.
 35. Theapparatus of claim 29 wherein checking for a first data portion having afirst data value includes checking for a data portion that indicates toa decoder that each scan line of an image was filtered with a samefilter type.
 36. The apparatus of claim 29 wherein checking for a firstdata portion having a first data value includes checking for a firstdata portion that indicates to a decoder that each scan line of an imagewas filtered with a same filter method.
 37. A portable network graphics(PNG) data file, comprising: an image data chunk, included in aplurality of data chunks in the file; and a critical data chunk,included in the plurality of data chunks in the file, the critical datachunk to convey information to a decoder about skipping a verificationoperation during a decoding of data in the image data chunk.
 38. Thedata file of claim 37 wherein the information about skipping theverification operation includes information about skipping a computationof a checksum.
 39. The data file of claim 38 wherein the informationabout skipping the verification operation further includes informationabout skipping the reading of a header in the image data chunk.
 40. Thedata file of claim 39 wherein the image data chunk includes image datathat is not preceded by a header.
 41. The data file of claim 37 whereinthe image data chunk includes data including a premultiplied alphachannel.
 42. A modified portable network graphics (PNG) data file,comprising: an image data chunk, included in a plurality of data chunksin the file, the image data chunk to include data encoded without a datacheck; and a critical data chunk, included in the plurality of datachunks in the file, the critical data chunk to indicate to a decoderthat the image data chunk includes data encoded without the data check.43. The PNG data file of claim 42 wherein the image data chunk includesdata encoded without a cyclic redundancy check.
 44. The PNG data file ofclaim 42 wherein at least some of the data in the image data chunkincludes data representing an opaque image that is encoded with afour-channel RGBA format.
 45. A digital storage medium having storedthereon a data file representing an image, wherein the data fileincludes data stored in a portable network graphics (PNG) file format,the PNG file format modified to include: an image data chunk, includedin a plurality of data chunks in the file; a critical data chunk,included in the plurality of data chunks in the file, the critical datachunk to convey to a decoder information about simplifying the decodingof the image data chunk.
 46. The digital storage medium of claim 45wherein the information about simplifying the decoding of the image datachunk includes information about skipping a data check.
 47. A method,comprising: encoding data into a first data section of a plurality ofdata sections in a file, the first data section including a first datavalue of a first type or a second type; and encoding data into a seconddata section of the plurality of data sections in the file, the seconddata section to include information to allow a decoder to perform a datacheck on the data of the second data section if the first data sectionincludes the first data value of the first type, the second data sectionto include information to allow the decoder to skip the data check onthe data of the second data section if the first data section includes afirst data value of the second type.
 48. The method of claim 47 whereinencoding data into the first data section including the first data valueof the first type includes encoding information into a critical datachunk in a PNG file that indicates to a decoder that a computation of achecksum will be performed.
 49. The method of claim 48 wherein encodingdata into the second data section includes encoding a data check valueappended to the data in the second data section.
 50. The method of claim47 wherein encoding data into the first data section including a firstdata value of the second type includes encoding information into acritical data chunk in a PNG file that indicates to a decoder that acomputation of a checksum will not be performed.
 51. The method of claim50 wherein encoding data into the second data section includes encodingdata without a data check value appended to the data in the second datasection.
 52. The method of claim 47 wherein encoding data into the firstdata section includes encoding an indication to a decoder that a scanline of an image represented by the file has been filtered with a samefilter as another scan line of the image represented by the file.
 53. Anapparatus, comprising: means for encoding data into a first data sectionof a plurality of data sections in a file, the first data sectionincluding a first data value of a first type or a second type; and meansfor encoding data into a second data section of the plurality of datasections in the file, the second data section to include information toallow a decoder to perform a data check on the data in the second datasection if the first data section includes the first data value of thefirst type, the second data section to include information to allow thedecoder to skip the data check on the data of the second data section ifthe first data section includes a first data value of the second type.54. A machine-readable medium storing executable program instructionswhich when executed cause the machine to perform a method comprising:encoding data into a first data section of a plurality of data sectionsin a file, the first data section including a first data value of afirst type or a second type; and encoding data into a second datasection of the plurality of data sections in the file, the second datasection including information to allow a decoder to perform a data checkon the data in the second data section if the first data sectionincludes the first data value of the first type, the second data sectionincluding information to allow the decoder to skip the data check on thedata of the second data section if the first data section includes afirst data value of the second type.
 55. The machine-readable medium ofclaim 54 wherein said encoding of data into the first data sectionincluding the first data value of the first type comprises encodinginformation into a critical data chunk in a PNG file that indicates to adecoder that a computation of a checksum will be performed.
 56. Themachine-readable medium of claim 55 wherein said encoding of data intothe second data section includes encoding a data check value into animage data (IDAT) chunk.
 57. The machine-readable medium of claim 54wherein said encoding of data into the first data section including afirst data value of the second type comprises encoding information intoa critical data chunk in a PNG file that indicates to a decoder that acomputation of a checksum will not be performed.
 58. Themachine-readable medium of claim 57 wherein said encoding of data intothe second data section comprises encoding data without a data checkvalue into an image data chunk (IDAT).
 59. The machine-readable mediumof claim 54 wherein said encoding of data into the first data sectionincludes encoding information to inform a decoder that each scan line ofan image represented by the file has been filtered by a same filter. 60.The machine-readable medium of claim 54 wherein said encoding of datainto the first data portion includes encoding information to inform adecoder that an image has been encoded with an arbitrary ordering ofcomponents for a pixel.
 61. The machine-readable medium of claim 60wherein said encoding of data into the second data section includesencoding data representing an image with an arbitrary ordering ofcomponents for a pixel.
 62. The machine-readable medium of claim 54wherein said encoding of data into the second data section includesencoding a premultiplied alpha channel into the second data section. 63.A method, comprising: encoding data into a first data section of aplurality of data sections in a file, the first data section including afirst data value of a first type or a second type; and encoding datainto a second data section of the plurality of data sections in thefile, the second data section to include information specifying a datacheck to be performed on the data of the second data section if thefirst data section includes the first data value of the first type, thesecond data section to include information specifying to skip the datacheck on the data of the second data section if the first data sectionincludes a first data value of the second type.
 64. A machine-readablemedium storing executable program instructions which when executed causethe machine to perform a method comprising: encoding data into a firstdata section of a plurality of data sections in a file, the first datasection including a first data value of a first type or a second type;and encoding data into a second data section of the plurality of datasections in the file, the second data section to include informationspecifying a data check to be performed on the data of the second datasection if the first data section includes the first data value of thefirst type, the second data section to include information specifying toskip the data check on the data of the second data section if the firstdata section includes a first data value of the second type.